R语言prodest包 prodestACF函数使用说明 |
您所在的位置:网站首页 › r语言 prod函数 › R语言prodest包 prodestACF函数使用说明 |
返回R语言prodest包函数列表 功能\作用概述:函数的作用是:至少接受6个对象(id、time、output、free、state和proxy变量),并返回一个S3类prod对象,其中包含三个元素:(i)模型相关对象的列表,(ii)第一阶段残差的估计和估计向量中使用的数据的列表,以及(iii)估计参数和参数的列表他们的引导标准错误。 语法\用法:prodestACF(Y, fX, sX, pX, idvar, timevar, R = 20, cX = NULL, opt = 'optim', theta0 = NULL, cluster = NULL) 参数说明:Y : 增值日志输出的向量。 示例\实例:require(prodest) ## Chilean data on production.The full version is Publicly available at ## http://www.ine.cl/canales/chile_estadistico/estadisticas_economicas/industria/ ## series_estadisticas/series_estadisticas_enia.php data(chilean) # we fit a model with two free (skilled and unskilled), one state (capital) # and one proxy variable (electricity) ACF.fit < - prodestACF(chilean$Y, fX = cbind(chilean$fX1, chilean$fX2), chilean$sX, chilean$pX, chilean$idvar, chilean$timevar, theta0 = c(.5,.5,.5), R = 5) set.seed(154673) ACF.fit.solnp < - prodestACF(chilean$Y, fX = cbind(chilean$fX1, chilean$fX2), chilean$sX, chilean$pX, chilean$idvar, chilean$timevar, theta0 = c(.5,.5,.5), opt = 'solnp') # run the same regression in parallel # nCores < - as.numeric(Sys.getenv("NUMBER_OF_PROCESSORS")) # Windows systems nCores < - 3 cl < - makeCluster(getOption("cl.cores", nCores - 1)) set.seed(154673) ACF.fit.par < - prodestACF(chilean$Y, fX = cbind(chilean$fX1, chilean$fX2), chilean$sX, chilean$pX, chilean$idvar, chilean$timevar, theta0 = c(.5,.5,.5), cluster = cl) stopCluster(cl) # show results coef(ACF.fit) coef(ACF.fit.solnp) # show results in .tex tabular format printProd(list(ACF.fit, ACF.fit.solnp)) |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |